package com.ruoyi.course.service.impl;

import com.ruoyi.course.domain.StuCourse;
import com.ruoyi.course.mapper.StuCourseMapper;
import com.ruoyi.course.service.StuCourseService;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class StuCourseServiceImpl implements StuCourseService {
    @Resource
    private StuCourseMapper courseMapper;

    @Resource
    private StringRedisTemplate stringRedisTemplate;


    @Override
    public List<StuCourse> selectCourseList(StuCourse course)
    {

        return courseMapper.selectCourseList(course);
    }

    @Override
    public List<StuCourse> selectAllCourses() {
        return courseMapper.selectAllCourses();
    }

    @Override
    public List<Long> selectStuCoursesListByStageId(Long stageId) {
        return courseMapper.selectStuCoursesListByStageId(stageId);
    }

    @Override
    public int insertStuCourse(StuCourse stuCourse) {
        return courseMapper.insertStuCourse(stuCourse);
    }

    @Override
    public int updateStuCourse(StuCourse stuCourse) {
        return courseMapper.updateCourse(stuCourse);
    }

    @Override
    public int deleteStuCourse(Long courId) {
        return courseMapper.deleteCourseById(courId);
    }

    @Override
    public int deleteCourseByIds(Long[] courIds) {
        return courseMapper.deleteCourseByIds(courIds);
    }

    @Override
    public StuCourse selectCourseById(Long courId) {
        return courseMapper.selectCourseById(courId);
    }


}
